import BaseApi from '../BaseApi';

const controller = "/userGroup";

export default {

    listUserGroup(condition) {
        return this.requestPost(controller, "/listUserGroup", condition);
    },
    insertOrUpdateUserGroup(condition) {
        return this.requestPost(controller, "/insertOrUpdateUserGroup", condition);
    },
    deleteUserGroup(condition) {
        return this.requestPost(controller, "/deleteUserGroup", condition);
    },
    listCustomerUser(condition) {
        return this.requestPost(controller, "/listCustomerUser", condition);
    },
    
    //绑定用户
    listAdminUserGroupBindUser(condition) {
        return this.requestPost(controller, "/listAdminUserGroupBindUser", condition);
    },
    insertOrUpdateAdminUserGroupBindUser(condition){
        return this.requestPost(controller, "/insertOrUpdateAdminUserGroupBindUser", condition);
    },
    deleteAdminUserGroupBindUser(condition){
        return this.requestPost(controller, "/deleteAdminUserGroupBindUser", condition);
    },
    downloadQrCode(condition){
        return this.requestPost(controller, "/downloadQrCode", condition);
    },
    listUserGroupAll(){
        return this.requestPost(controller, "/listUserGroupAll");
    },
    bindActivityToUserGroup(condition){
        return this.requestPost(controller, "/bindActivityToUserGroup", condition);
    },

    /*请求封装*/
    requestPost(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPost(newUrl, condition);

    },
    requestGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestGet(newUrl, condition);
    },


}
